#pragma once

#include <stdio.h>
#include<stdlib.h>
#include<assert.h>

typedef int HPDataTape;

typedef struct Heap
{
	HPDataTape* a;
	int size;
	int capacity;
}hp;

void HeapInit(hp* pa);
void HeapPush(hp* pa,HPDataTape x);
void AdjustUp(HPDataTape* a, int child);
void HeapPop(hp* pa);
void AdjustDown(HPDataTape* a, int size,int father);
void HeapSort(HPDataTape* a, int size);
